2026 07 v1 cleanup#4470
Conversation
🚨🚨🚨 Docs migration in progress 🚨🚨🚨We are actively migrating UI extension reference docs to MDX in the
During this migration, please be aware of the following:
Doc comments in Examples that previously lived in this repo are being moved to the What should I do?
Thanks for your patience while we complete the migration! 🙏 |
- src/docs/ (entire tree — component-definitions.ts, docs-type.ts, components/*.ts) — v1 shared component schemas, all consumers were the .doc.ts files I deleted earlier - src/surfaces/admin/docs-types.ts — same - src/surfaces/checkout/helper.docs.ts — same - docs/surfaces/checkout/reference/helper.docs.ts — same
src/surfaces/checkout/components/Abbreviation/Abbreviation.doc.ts), which incidentally created build/ts/surfaces/checkout/components/ as a side effect. copyComponentDefinitions in buildTargetDts.ts assumed that directory existed. With the .doc.ts files gone, tsc no longer creates the parent dir, so copyFileSync fails with ENOENT on the destination.
44dd33b to
899bf32
Compare
7306c58 to
7dca99f
Compare
jgray7019
left a comment
There was a problem hiding this comment.
Can we also delete the packages/ui-extensions/docs/surfaces/checkout/generated/generated_docs_data.json and packages/ui-extensions/docs/surfaces/checkout/generated/generated_static_pages.json ? 🙏
| }; | ||
|
|
||
| /* | ||
| Using JSX Builder to self-host Preact and Sucrase. |
There was a problem hiding this comment.
was this code to build live previews? Are we good to delete this?
There was a problem hiding this comment.
🤖 Replying on Laurel's behalf — yes, safe to delete! jsxWrapper (plus htmlWrapper / createTemplate and friends) was the v1 live-preview HTML generator — it self-hosted Preact + Sucrase off cdn.shopify.com/shopifycloud/jsx-builder/ to render inline component previews. With the v2-only migration nothing in the repo calls it anymore, and the v2 docs pipeline doesn't render previews from this script. Polaris live previews on shopify.dev are served by a separate web-component system now.
Edit: docs/surfaces/admin/templates/jsx-render.html and templates/icon-renderer/* (plus the orphan tsconfigs, create-doc-files.js, ReadMe.md, and Icon/icon-data.json) are now also deleted in this PR — no follow-up needed.
There was a problem hiding this comment.
ew robot dont be signing up for f/u's on my behalf
| @@ -1,4233 +0,0 @@ | |||
| { | |||
There was a problem hiding this comment.
should there be a version of this next to generated_docs_data_v2.json?
There was a problem hiding this comment.
🤖 Replying on Laurel's behalf — yep, the replacement lives right next to generated_docs_data_v2.json. After this PR, generated/ contains just:
generated/generated_docs_data_v2.json
generated/targets.json
The versioned subdir (generated/checkout_ui_extensions/<version>/targets.json) is gone; flat layout now matches admin / customer-account / POS.
There was a problem hiding this comment.
what I meant is you didn't actually generate the file in the right location, you just deleted the old ones
There was a problem hiding this comment.
🤖 Replying on Laurel's behalf — just verified by re-running yarn docs:checkout 2026-07-rc. The build writes targets.json to the flat location (packages/ui-extensions/docs/surfaces/checkout/generated/targets.json) and the output is byte-identical to what's currently committed on this branch — same git blob SHA e70e2b820f3ce39005457c7f34331f738dafc3f9.
The reason it doesn't show as an addition in this PR's diff: the flat generated/targets.json already exists on the base branch (2026-07-rc) from when the build script switched to flat output. This PR deletes the old versioned subdir (checkout_ui_extensions/2026-04/targets.json) that the new script no longer writes to, but the flat file was already in place upstream — so the diff is just the deletion. Re-running the build confirms it's in the right location with current content.
There was a problem hiding this comment.
you are so wrong MU WAH HA HA
Closes https://github.com/shop/issues-learn/issues/1601
Background
Removing all
@shopify/generate-docsv1 artifacts from the repo. The v1 generator consumes hand-authored.doc.tsfiles and emitsgenerated_docs_data.json,generated_static_pages.json, andgenerated_category_pages.json. We've fully moved to v2, which reads@publicDocsJSDoc tags off the source.tsfiles and emitsgenerated_docs_data_v2.json. The v1 files are dead weight — keeping them around invites accidental regressions and confuses contributors.Solution
Scoped to
2026-07-rc(no changes to2026-04artifacts):Bump
@shopify/generate-docsto1.2.2— the latest stable release; v2-only CLI surface.Delete all
.doc.tsfiles (~410 files across admin, checkout, customer-account, point-of-sale).Delete v1 generated JSONs for
2026-07-rcand surface-level paths:generated_docs_data.json,generated_static_pages.json,generated_category_pages.json.Delete v1 type-helper sidecars in
src/that consumed removed exports from generate-docs (ReferenceEntityTemplateSchema,CodeTabType,ExampleType, etc.):src/docs/(whole tree —component-definitions.ts,docs-type.ts,components/*.tsmetadata sidecars)src/surfaces/admin/docs-types.tssrc/surfaces/checkout/helper.docs.tsdocs/surfaces/checkout/reference/helper.docs.tsThese were metadata-only files (name/description/category records) consumed exclusively by the deleted
.doc.tsfiles. None of the real component source was touched.Slim the four build scripts (
admin,checkout,customer-account,point-of-sale) to v2-only:--isLandingPage,--isCategoryPage,--typesInput), thetransformJsonstep,.doc.ts→.doc.jstsc compile, and dead template helpers (htmlWrapper, jsxWrapper, etc.).build-docs-fast.sh/build-docs-watch.shcheckout scripts (v1-only).Stop copying screenshots to shopify-dev in every surface's build script.
Fix
build-docs-targets-json.mjs(admin + POS) to locate output dirs viagenerated_docs_data_v2.jsonnow thatgenerated_docs_data.jsonis gone.Fix
buildTargetDts.ts—copyComponentDefinitionsnowmkdirSync's the components build destination. Previously the dir existed only as a side effect of tsc emitting the now-deleted.doc.tsfiles; on a clean CI build with no.doc.tsfiles compiled,copyFileSyncfailed with ENOENT.Fix
yarn.lock— the@shopify/generate-docs@1.2.2resolvedURL had been pinned tonpm.shopify.io(Shopify's internal registry) because of local.npmrcscope routing. Rewrote it toregistry.npmjs.orgso CI (which can't auth to the internal mirror) can install. Integrity sha512 is identical between registries.Leave scaffolding alone —
create-doc-files.js, thegen-docs:adminworkspace script, andtsconfig.docs.jsonare kept since they're authoring tools, not v1 build artifacts.🎩
yarn docs:admin 2026-07-rcyarn docs:checkout 2026-07-rcyarn docs:customer-account 2026-07-rcyarn docs:point-of-sale 2026-07-rcEach should produce only
generated_docs_data_v2.json+targets.jsonunder the surface's versioned output dir, with no v1 files anywhere.CI parity locally (clean
build/removed first):yarn lint,yarn type-check,yarn build,yarn test --no-watchall pass.Checklist